package com.gitee.huanminabc.jfastcache;

import java.io.Serializable;

public interface Cache <K, V> extends Serializable {

    //添加缓存
    boolean put(K key, V value);

    boolean put(K key, V value, long timeout);

    //获取缓存
    V get(K key);

    //删除缓存
    V remove(K key);
    //清空全部缓存
    void clear();
    //允许手动强制gc缓存
    void pruneCache();

}
